var share= require("../../share")
exports.login = (link_key,ws,data,msg)=>
{
    this.login1(link_key,ws,data,msg)
}

exports.login1=(link_key,ws,{cmd,userid},msg)=>{
    console.log('login1:', userid,linkkey_Clients_id[userid]!=null,ws._isServer)
 if (id_Clients_linkkey[userid] == null) {       
        id_Clients_linkkey[userid] = link_key;
        linkkey_Clients_id[link_key] = userid
        share.printLength()
        var response = { "code": 200, "msg": "登录成功" };
        share.send_response(userid,"user.login", response);
    }
    else
    {
        var response = {"code": 404, "msg": "重复登录成功" };
        share.send_response(userid,"user.login",response)
    }
}